<!DOCTYPE html>
<html>
<head>
<title>路由</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="../../lib/angular/angular.js"></script>
<script type="text/javascript" src="/lib/angular/angular-route.js"></script>
<script type="text/javascript" src="route.js"></script>
<style type="text/css">
div li {
	display: inline-block;
}

div li a {
	display: inline-block;
	width: 100px;
	border: 1px solid #006600;
	background-color: #00FF99;
	font-size: 14px;
}
</style>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
    <h2>路由</h2>

    <div>
        <li><a href="#/">首页</a></li>
        <li><a href="#/computers?name=ASUS">电脑</a></li>
        <li><a href="#/printers/100">打印机</a></li>
        <li><a href="#/blabla">其他</a></li>
    </div>
    <br> Choose:
    <div>
        <li><a href="#/Book/Moby">Moby</a></li>
        <li><a href="#/Book/Moby/ch/1">Moby: Ch1</a></li>
        <li><a href="#/Book/Gatsby">Gatsby</a></li>
        <li><a href="#/Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a></li>
        <li><a href="#/Book/Scarlet">Scarlet Letter</a><br /></li>
    </div>
    <br>
    <h4>页面内容ng-view</h4>
    <div ng-view></div>

    <br>
    <h4>route参数</h4>
    <div>
        <pre>$location.path() = {{$location.path()}}</pre>
        <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
        <pre>$route.current.params = {{$route.current.params}}</pre>
        <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
        <pre>$routeParams = {{$routeParams}}</pre>
    </div>
</body>
</html>
